#!/usr/bin/env python3
# -*- coding: utf-8 -*-
b = bytes.fromhex

s_name =  "NGEE 15970H~15A34H	007 Goldeneye (USA)"
sample = b("""27BDFFE0 AFBF0014 AFA40020 0C005798 AFA0001C 3C0E8006 91CE7CE0 24010001
              11C1000C 00000000 0C0053B7 00000000 3C058006 24A57CA0 0C0057B4 24040001
              AFA2001C 8FA40020 00002825 0C003774 24060001 AFA00018 8FB80018 8FA80018
              3C018006 0018C880 00390821 240F00FF AC2F7CA0 25090001 29210010 1420FFF6
              AFA90018 3C018006 3C058006 AC207CDC 24A57CA0 0C0057B4 00002025 240A0001
              3C018006 AFA2001C 0C0057A9 A02A7CE0 8FBF0014 8FA2001C 27BD0020 03E00008
              00000000""")

s_mask = b("""FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFF0000 FFFF0000 FFFFFFFF
              FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFF0000 FFFF0000 00000000 FFFFFFFF
              FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFF0000 FFFFFFFF FFFFFFFF FFFFFFFF FFFF0000 FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF FFFF0000 FFFF0000 FFFF0000 FFFF0000 00000000 FFFFFFFF FFFFFFFF
              FFFF0000 FFFFFFFF 00000000 FFFF0000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
              FFFFFFFF""")

symbol = (('+', 'V0 = errors sending SI read controller command (1) using queue A0, creating if necessary', 0x6FFFF400),
          )

# Only two functions check the "last used SI cmd", patch the loads instead of writes.
p_cmds = ((0x20, 0x24, 4),	# Kinda a hack, copies a NOP
          )
